<template>
  <view>
    <view class="inner-des" v-for="(item,index) in studentList" :key="index">
      <view class="student-des">
        <view class="student-left">
          <text>学生档案</text>
          <text class="icon iconfont icon-dangan"></text>
        </view>
        <view class="student-inner">
          <view class="student-box">
            <view class="inner-des-box">
              <text class="left-title">姓名：</text>
              <text class="des-title">{{ item.name || '暂无'  }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">性别：</text>
              <text class="des-title">{{ item.sex || '暂无'  }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">年龄：</text>
              <text class="des-title">{{ item.birthday || '暂无'  }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">入学年份：</text>
              <text class="des-title">{{ item.year || '暂无'  }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">学号：</text>
              <text class="des-title">{{ item.number || '暂无'  }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">联系电话：</text>
              <text class="des-title">{{ item.mobile || '暂无' }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">年级：</text>
              <text class="des-title">{{ item.grade || '暂无'  }}</text>
            </view>
            <view class="inner-des-box">
              <text class="left-title">班级：</text>
              <text class="des-title">{{ item.classs || '暂无'  }}</text>
            </view>
            <view class="inner-des-box inner-des-box2">
              <text class="left-title">学校：</text>
              <text class="des-title">{{ item.school || '暂无'  }}</text>
            </view>
            <!-- <view class="inner-des-box inner-des-box2">
              <text class="left-title">地址：</text>
              <text class="des-title">{{ item.address || '暂无'  }}</text>
            </view> -->
            
            
          </view>
        </view>
        <view class="student-handle" v-if="tiJianHandleFlag == true">
          <u-button type="primary" @click="toDetails(item)">
            <text class="icon iconfont icon-tijian"></text>去体检
          </u-button>
        </view>
      </view>
      <text class="icon iconfont icon-xueshengdanganshengcheng"></text>
    </view>
  </view>
</template>
<script>
export default {
  props:['tiJianHandleFlag','studentList','activeProject'],
  methods:{
    toDetails(item){
      uni.navigateTo({
        url:`/pages/home/inspectDetail/index?activeProject=${this.activeProject}&studentId=${item.id}`
      })
    }
  }
}
</script>
<style lang="scss">
  .inner-des{
    margin-top: 20px;
    box-shadow: 0 1px 10px $u-primary-disabled;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    height: 200px;
    box-sizing: border-box;
    position: relative;
    .icon-xueshengdanganshengcheng{
      position: absolute;
      right: 0;
      bottom: 0;
      font-size: 110px;
      color: rgba(0,121,107,0.1);
    }
    .student-des{
      height: 200px;
      width: 100%;
      position: absolute;
      left: 0;
      bottom: 0;
      padding: 20px;
      box-sizing: border-box;
      display: flex;
      justify-content: center;
      align-items: center;
      .student-left{
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 24px;
        width: 110px;
          color: $u-primary;
        .icon-dangan{
          font-size: 80px;
          color: rgba(0,121,107,0.8);
        }
      }
      .student-inner{
        flex: 1;
        .student-box{
          display: flex;
          flex-flow: row wrap;
        }
        .inner-des-box{
          font-size: 14px;
          flex:  50%;
          color: #666;
          padding-bottom: 6px;
          .left-title{
            width: 80px;
            display: inline-block;
            text-align: right;
          }
          .des-title{
            font-size: 18px;
            color: #333;
            // color: rgba(0,121,107,1);
            font-weight: 500;
          }
        }
        .inner-des-box2{
          flex: 100%;
        }
      }
      .student-handle{
        width: 100px;
        z-index: 1000;
      }
    }
  }
</style>